#include<iostream>
#include<cstring>
using namespace std;
const int N = 2e5 + 10, M = N * 2;
int w[N], l[N], r[N], tot;
int h[N], e[M], ne[M], idx;
int tree1[N], tree2[N];
int n, m;
void add(int a, int b)
{
	e[idx] = b, ne[idx] = h[a], h[a] = idx++;
}
int lowbit(int x)
{
	return x & -x;
}

void add(int tree[], int x, int v)
{
	for (int i = x; i <= n; i += lowbit(i)) {
		tree[i] += v;
	}
}

int query(int tree[], int x)
{
	int ans = 0;
	for (int i = x; i; i -= lowbit(i)) {
		ans += tree[i];
	}
	return ans;
}
void dfs(int u, int fa)
{
	l[u] = ++tot;
	for (int i = h[u]; ~i; i = ne[i]) {
		int j = e[i];
		if (j != fa) {
			dfs(j, u);
		}
	}
	r[u] = tot;
}
int main()
{
	cin >> n >> m;
	memset(h, -1, sizeof(h));
	for (int i = 0; i < n - 1; i++) {
		int a, b;
		cin >> a >> b;
		add(a, b);
		add(b, a);
	}
	dfs(1, 0);
	for (int i = 1; i <= n; i++) {
		cin >> w[i];
		add(tree1, l[i], w[i]);
		add(tree2, l[i], w[i]);
		add(tree2, r[i] + 1, -w[i]);
	}
	while (m--) {
		int op;
		cin >> op;
		if (op == 1) {
			int x, v;
			cin >> x >> v;
			int d = v - w[x];
			w[x] = v;
			add(tree1, l[x], d);
			add(tree2, l[x], d);
			add(tree2, r[x] + 1, -d);
		}
		else {
			int x;
			cin >> x;
			cout << query(tree1, r[x]) - query(tree1, l[x] - 1) << " ";
			cout << query(tree2, l[x]) << endl;
		}
	}
	
	return 0;
}